using System;
using Rhino.Mocks;

namespace Source.Tests.Utility
{
    public class MockingScope : IDisposable
    {
        public MockRepository Mocks { get; set; }

        public MockingScope(MockRepository mocks)
        {
            Mocks = mocks;
            Mocks.ReplayAll();
        }

        public void Dispose()
        {
            Mocks.VerifyAll();
        }
    }
}